class Solution {
public:
    vector<string> findRepeatedDnaSequences(string s) {         
        std::unordered_map<std::string, int>seqCnt;
        std::vector<std::string> result;
        if (s.length() < 10) {            
            return result;
        }
        for (int i = 0; i <= s.length() - 10; ++i) {                        
            seqCnt[s.substr(i, 10)]++; 
        }
        for (auto iter = seqCnt.begin(); iter != seqCnt.end(); iter++) {
            if (iter->second > 1) {
                result.push_back(iter->first);
            }
        }
        return result;
    }
};